#ifndef OMMIT_UNIT_TEST

#include <UnitTest++/src/UnitTest++.h>

#include "GenInfo.h"
#include <strstream>
#include <string>

TEST(OperatorInTest)
  {
  std::stringstream str_gen_info;
  GenInfo gen_info;

  str_gen_info << "2 3 4" << '\n';
  str_gen_info >> gen_info;

  CHECK_EQUAL(2, gen_info.m_edges);
  CHECK_EQUAL(3, gen_info.m_filling);
  CHECK_EQUAL(4, gen_info.m_max);
  }

TEST(OperatorLessTest)
  {
  GenInfo gen_info1 = {3, 3, 3};
  GenInfo gen_info2 = {1, 3, 5};
  GenInfo gen_info3 = {5, 3, 3};
  GenInfo gen_info4 = {2, 3, 4};
  GenInfo gen_info5 = {2, 2, 2};
  GenInfo gen_info6 = {3, 3, 3};

  CHECK(gen_info2 < gen_info1);
  CHECK(!(gen_info1 < gen_info2));

  CHECK(gen_info2 < gen_info3);
  CHECK(!(gen_info3 < gen_info2));

  CHECK(gen_info5 < gen_info4);

  CHECK(!(gen_info1 < gen_info6));
  CHECK(!(gen_info6 < gen_info1));
  }
#endif